package _06PrototypeDesignPattern;

import javax.sound.midi.Soundbank;

public class ShallowPerson implements Cloneable {
        private int id;
        private String name;
        private String age;
        private ShallowAddress address;

    public ShallowAddress getAddress() {
        return address;
    }

    public void setAddress(ShallowAddress address) {
        this.address = address;
    }


    public ShallowPerson(int id, String name, String age ,ShallowAddress address) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.address=address;
    }

    public int getId() {
        return id;
    }

    @Override
    public String toString() {
        return "ShallowPerson{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", address=" + address +
                '}';
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public ShallowPerson clone(){
        try {
            return (ShallowPerson)super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
